<!doctype html>
<html lang="en">
<head>
    <title>Code coverage report for src/views/main-content.vue</title>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="..\..\prettify.css" />
    <link rel="stylesheet" href="..\..\base.css" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <style type='text/css'>
        .coverage-summary .sorter {
            background-image: url(..\..\sort-arrow-sprite.png);
        }
    </style>
</head>
<body>
<div class='wrapper'>
  <div class='pad1'>
    <h1>
      <a href="..\..\index.html">All files</a> / <a href="index.html">src/views</a> main-content.vue
    </h1>
    <div class='clearfix'>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Statements</span>
        <span class='fraction'>0/57</span>
      </div>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Branches</span>
        <span class='fraction'>0/22</span>
      </div>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Functions</span>
        <span class='fraction'>0/28</span>
      </div>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Lines</span>
        <span class='fraction'>0/46</span>
      </div>
    </div>
  </div>
  <div class='status-line low'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126</td><td class="line-coverage quiet"><span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">&lt;<span class="cstat-no" title="statement not covered" >t<span class="fstat-no" title="function not covered" >em</span>plate&gt;</span>
  &lt;main class="site-content" :class="{ 'site-content--tabs': $route.meta.isTab }"&gt;
    &lt;!-- 主入口标签页 s --&gt;
<span class="cstat-no" title="statement not covered" >    &lt;el-tabs</span>
      v-if="$route.meta.isTab"
      v-model="mainTabsActiveName"
      :closable="true"
      @tab-click<span class="cstat-no" title="statement not covered" >="selectedTabHandle"</span>
      @tab-remove="removeTabHandle"&gt;
<span class="cstat-no" title="statement not covered" >      &lt;el-dropdown class="site-tabs__tools" :show-timeout="0"&gt;</span>
        &lt;i class=<span class="fstat-no" title="function not covered" >"el-i</span>con-arrow-down el-icon--right"&gt;&lt;/i&gt;
<span class="cstat-no" title="statement not covered" >        &lt;el-dro</span>pdown-menu slot="dropdown"&gt;
          &lt;el-dropdown-item @click.native="tabsCloseCurrentHandle"&gt;关闭当前标签页&lt;/el-dropdown-item&gt;
          &lt;el-dropdown-item @click.native="tabsCloseOtherHandle"&gt;关闭其它标签页&lt;/el-dropdown-item&gt;
          &lt;el-dropdown-item @click.native="tabsCloseAllHandle"&gt;关闭全部标签页&lt;/el-dropdown-item&gt;
          &lt;el-dropdown-item @click.native="tabsRefreshCurrentHandle"&gt;刷新当前标签页&lt;/el-dropdown-item&gt;
        &lt;/el-dropdow<span class="fstat-no" title="function not covered" >n-me</span>nu&gt;
      &lt;/<span class="cstat-no" title="statement not covered" >el-dropdown&gt;</span>
      &lt;el-tab-pane
        v-for="item in mainTabs"
        :key="item.name"
        :label="item<span class="fstat-no" title="function not covered" >.tit</span>le"
<span class="cstat-no" title="statement not covered" >        :name="item.name"&gt;</span>
        &lt;el-card :body-style="siteContentViewHeight"&gt;
          &lt;iframe<span class="fstat-no" title="function not covered" ></span>
<span class="cstat-no" title="statement not covered" >            v-if="item.type === 'iframe'"</span>
            :src="item.iframeUrl"
            width="100%" height="100%" frameborder="0" scrolling="yes"&gt;
          &lt;/iframe&gt;
          &lt;keep-aliv<span class="fstat-no" title="function not covered" >e v-</span>else&gt;
<span class="cstat-no" title="statement not covered" >            &lt;router-view v-if="item.name === mainT</span>absActiveName" /&gt;
          &lt;/keep-alive&gt;
        &lt;/el-card&gt;<span class="fstat-no" title="function not covered" ></span>
      &lt;/<span class="cstat-no" title="statement not covered" >el-tab-pane&gt;</span>
    &lt;/el-tabs&gt;
    &lt;!-- 主入口标签页 e --&gt;
    &lt;el-card v-else :body-style="siteContentViewHeight"&gt;
      &lt;keep-alive&gt;<span class="fstat-no" title="function not covered" ></span>
<span class="cstat-no" title="statement not covered" >        &lt;router-view /&gt;</span>
      &lt;/keep-alive&gt;
    &lt;/el-card&gt;<span class="fstat-no" title="function not covered" ></span>
  &lt;/main<span class="cstat-no" title="statement not covered" >&gt;</span>
&lt;/template&gt;
&nbsp;
&lt;script&gt;<span class="fstat-no" title="function not covered" ></span>
  import { isURL } <span class="cstat-no" title="statement not covered" >from '@/utils/validate'</span>
  expo<span class="cstat-no" title="statement not covered" >rt default {</span>
    data<span class="cstat-no" title="statement not covered" > () {</span>
      re<span class="cstat-no" title="statement not covered" >turn {</span>
      }
    },<span class="cstat-no" title="statement not covered" ></span>
    computed: {
      documentClientHeight: {
        get () { return this.$store.state.common.documentClientHeight }
      },
      menuActiveName: {<span class="fstat-no" title="function not covered" ></span>
<span class="cstat-no" title="statement not covered" >        get () { return this.$sto<span class="fstat-no" title="function not covered" >re</span>.state.common.menuActiveName },</span>
<span class="cstat-no" title="statement not covered" >        set (val) { this.$store.commit(</span>'common/updateMenuActiveName', val) }
      },
<span class="cstat-no" title="statement not covered" >      mainTabs: {</span>
<span class="cstat-no" title="statement not covered" >        get () { return this.$store.state.common.m</span>ainTabs },
        set (val) { this.$store.commit('common/updateMainTabs', val) }
      },
      mainTabsActiveName: {
        get () { return this.$store.state.common.mainTabsActiveName },
        set (val) { this.$stor<span class="fstat-no" title="function not covered" >e.commit('common</span>/updateMainTabsActiveName', val) }
      },<span class="cstat-no" title="statement not covered" ></span>
      siteContentViewHeight () {
<span class="cstat-no" title="statement not covered" >        var height = this.documentClientHei<span class="fstat-no" title="function not covered" >gh</span>t - 50 - 30 - 2</span>
<span class="cstat-no" title="statement not covered" >        if (this.$route.meta.isTab) {</span>
          height -= 40
<span class="cstat-no" title="statement not covered" >          return isURL(this.$route.meta.iframeUrl) ? { height: height + 'px' } : { minHeight: height + 'px' }</span>
        }
<span class="cstat-no" title="statement not covered" >        return { minHeight: height + 'px' }</span>
      }<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" ></span></span>
    },<span class="cstat-no" title="statement not covered" ></span>
    methods: {
      // tabs, 选中tab
      selectedTabHandle (tab) {
<span class="cstat-no" title="statement not covered" >        tab = this.mainTabs.filter</span>(item =&gt; item.name === tab.name)
<span class="cstat-no" title="statement not covered" >        if (tab.length &gt;= 1) {</span>
          this.$router.push({ name: tab[0].name })
        }
      },
      // tabs, 删除tab
      removeTabHandle (tabName) {<span class="fstat-no" title="function not covered" ></span>
<span class="cstat-no" title="statement not covered" >        this.mainTabs = this.mainTabs.filter(item =&gt; </span>item.name !== tabName)
        if (this.mainTabs.length &gt;= 1) {
          // 当前选中tab被删除
          if (tabName === this.mainTabsActiveName) {
            this.$router.push({ nam<span class="fstat-no" title="function not covered" >e: this.mainTabs[this</span>.mainTabs.length - 1].name }, () =&gt; {
              this.<span class="cstat-no" title="statement not covered" >mainT</span>absActiveName = this.$route.name
            })
<span class="cstat-no" title="statement not covered" >          }<span class="fstat-no" title="function not covered" ></span></span>
<span class="cstat-no" title="statement not covered" >        } else {</span>
          this.menuActiveName = ''
          this.$router.push({ name: 'home' })
        }
      },
      // tabs, 关闭当前<span class="fstat-no" title="function not covered" ></span>
<span class="cstat-no" title="statement not covered" >      tabsCloseCurrentHand</span>le () {
<span class="cstat-no" title="statement not covered" >        this.removeTabHandle(thi</span>s.mainTabsActiveName)
<span class="cstat-no" title="statement not covered" >      },</span>
      // tabs, 关闭其它
      tabsCloseOtherHandle () {
        this.mainTabs = this.mainTabs.filter(item =&gt; item.name === this.mainTabsActiveName)
      },<span class="fstat-no" title="function not covered" ></span>
      // tabs, 关闭全部<span class="cstat-no" title="statement not covered" ></span>
      tabsCloseAllHandle () {
        this.mainTabs = <span class="cstat-no" title="statement not covered" >[]</span>
<span class="cstat-no" title="statement not covered" >        this.menuActiveName = ''</span>
<span class="cstat-no" title="statement not covered" >        this.$router.<span class="fstat-no" title="function not covered" >pu</span>sh({ name: 'home' })</span>
      },<span class="cstat-no" title="statement not covered" ></span>
      // tabs, 刷新当前
      tabsRefreshCurrentHandle () {
        var tempTabName = this.mainTabsActiveName
        this.removeTabHandle(tempTabName)
        this.$nextTick(() =&gt; {
          this.$router.push({ name: tempTabName })
        })
      }
    }
  }
&lt;/script&gt;
&nbsp;
&nbsp;</pre></td></tr>
</table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
  Code coverage
  generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Thu Sep 20 2018 10:14:21 GMT+0800 (中国标准时间)
</div>
</div>
<script src="..\..\prettify.js"></script>
<script>
window.onload = function () {
        if (typeof prettyPrint === 'function') {
            prettyPrint();
        }
};
</script>
<script src="..\..\sorter.js"></script>
</body>
</html>
